package com.qls.web.modules.op.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.qls.core.entity.OpTaskStatus;
import com.qls.web.common.utils.PageUtils;
import com.qls.web.common.utils.Query;
import com.qls.web.modules.op.dao.TaskStatusDao;
import com.qls.web.modules.op.service.TaskStatusService;
import com.qls.web.modules.vo.TaskVO;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


/**
 * @author doyoung
 */
@Service("taskStatusService")
public class TaskStatusServiceImpl extends ServiceImpl<TaskStatusDao, OpTaskStatus> implements TaskStatusService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<TaskVO> page = new Query<TaskVO>().getPage(params);
        params.put("page", page);
        List<TaskVO> list = baseMapper.sqlQueryPage(params);
        return new PageUtils(page, list);
    }

    @Override
    public int isExcuting(String taskCode) {

        return baseMapper.isExcuting(taskCode);
    }

}